﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Maticsoft.Model.CarrefourCover;
using System.Data;

namespace WebSite.UserControl
{
    public partial class Top5Popular : System.Web.UI.UserControl
    {
        public  List<Team> TeamListData { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            var teamBll = new Maticsoft.BLL.CarrefourCover.Team();
            int Top=5;
            string strWhere=" status=1 and type>=2";                
            string filedOrder=" TeamVoteNum desc";
            DataSet ds =  teamBll.GetList(Top, strWhere, filedOrder);
            if (ds != null && ds.Tables.Count > 0)
            {
                TeamListData = teamBll.DataTableToList(ds.Tables[0]);
            }
        }
    }
}